#pragma once
#include <WebSocket/types.h>
#include "../types.h"

namespace Call
{
    struct TcpHandleTask;

    struct TcpClientTask : public WS::Thread
    {
        TcpHandleTask *m_TcpHandleTask = 0;

        WS::TcpSocket m_tcpSocket;
        TcpClientTask() = default;
        TcpClientTask(const WS::TcpSocket &tcpSocket);


        void Run();
        enum State
        {
            Initial,
            Running,
            Disconnected,
        } m_State = State::Initial;

    protected:
        virtual void OnDisconnected();

    };
};
